package com.baby.movie.app.ui;

import com.baby.movie.R;
import com.baby.movie.widget.TabsAdapter;
import com.common.widget.Container;
import com.common.widget.PagerSlidingTabStrip;


public class MoreMTDetailActivity extends BaseActivity {
	
	private Container mContainer;
	
	private PagerSlidingTabStrip mTabStrip;
	
	private TabsAdapter mAdapter;

	@Override
	protected boolean showHome() {
		return true;
	}
	
	@Override
	protected int getContentViewRes() {
		return R.layout.activity_more_mt;
	}

	@Override
	protected void findViews() {
		mTabStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
		mContainer = (Container) findViewById(R.id.container);
	}

	@Override
	protected void initialize() {
		setTitle("儿童剧场");
		mTabStrip.setTextColorResource(R.color.text_color_gray);
		mTabStrip.setIndicatorColorResource(R.color.text_color_light_red);
		int iH = (int) (getResources().getDisplayMetrics().density * 2);
		mTabStrip.setIndicatorHeight(iH);
		mTabStrip.setShouldExpand(true);
		mTabStrip.setTabPaddingLeftRight(8);
		
		String[] titles = {"剧场推荐", "最新上传", "热门点播"};
		BaseFragment[] fragments = new BaseFragment[titles.length];
		BaseFragment fragment = new MTFragment();
		fragments[0] = fragment;
		fragment = new MTFragment();
		fragments[1] = fragment;
		fragment = new MTFragment();
		fragments[2] = fragment;
		fragment = new MTFragment();

		mAdapter = new TabsAdapter(this, fragments, titles);
		mContainer.setAdapter(mAdapter);

		mTabStrip.setViewPager(mContainer);
		
	}

}
